<template>
  <div class="ownerserve-box">
    <div class="my-title">业主服务</div>
    <div class="my-content">
      <div @click="toRentOut">
        <van-icon name="hotel-o" />
        <p>房屋出租</p>
      </div>
      <div @click="toAppointment">
        <van-icon name="phone-circle-o" />
        <p>房源预约</p>
      </div>
      <div></div>
      <div></div>
    </div>
  </div>
</template>

<script>
import {mapState} from "vuex"

export default {
  name: "",
  methods:{
    toRentOut(){
      if(!this.userId){
        this.$router.push('/login')
        return
      }
      this.$router.push('/houserentout')
    },
    toAppointment(){
      // console.log('房源预约');
      this.$router.push('/houseappiontment')
    }
  },
  computed:{
    ...mapState({
      userId:state => state.moduleUser.userId
    })
  }
};
</script>

<style scoped>
.ownerserve-box {
  margin: 0 10px;
  margin-bottom: 20px;
}
.my-title {
  font-size: 16px;
  font-weight: 700;
}
.my-content {
  display: flex;
  text-align: center;
  justify-content: center;
}
.my-content div {
  flex: 1;
  font-size: 20px;
  margin-top: 8px;
}
.my-content div p {
  margin-top: 3px;
  font-size: 12px;
}
.van-icon {
  color: #FF5456;
}
</style>